package biz.ezcom.design.pattern.observer;

import java.util.Observable;

/**
 *　老板：唤醒者
 */
public class ObservableBoss extends Observable{
	private String status;
	
	public ObservableBoss(String status) {
		this.status = status;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		if(status != null){
			if(!status.equals(this.status)){
				this.status = status;
				this.setChanged();//修改状态
				this.notifyObservers();//֪ͨ唤醒观察者
			}
		}
	}
	@Override
	public String toString() {
		return "ObservableBoss.toString()";
	}
	
}
